<?php

use yii\helpers\Html;
use yii\widgets\Breadcrumbs;
use frontend\assets\AppAsset;
use yii\widgets\LinkPager;
use frontend\controllers\AboutController;
use common\models\articles\Articles;
use common\models\Fenhuigrade\Fenhuigrade;
use common\models\member\Member;
use common\models\category\Category;

    // 会员风采
    $memberstyle = Member::find()->where(['status' => Member::STATUS_SUCCESS])->asArray()->limit(12)->all();
    $membersytletype = Category::find()->where(['id' =>20])->asArray()->one()['ctype'];
    // 品牌建设
    $pinpai = Articles::find()->where(['category_id'=>23, 'status' => Articles::STATUS_ACTIVE])->asArray()->limit(10)->all();
    $weiyuan = Articles::find()->where(['category_id' => 16, 'status' => Articles::STATUS_ACTIVE])->asArray()->limit(3)->all();
    $weiyuantype = Category::find()->where(['id' =>16])->asArray()->one()['ctype'];
    $fenhui = Fenhuigrade::find()->where(['status' => Fenhuigrade::STATUS_ACTIVE])->limit(6)->all();

?>
  <div class="Weizhi">
         <span>当前位置 : </span><a href="<?= yii\helpers\Url::to(['/']);?>">首页</a> ><?php if(isset($parentinfo)){ ?> <a href="<?= yii\helpers\Url::to([$parentinfo['type'], 'id' => $parentinfo['id']]); ?>"><?= $parenttitle; ?> > </a> <?php } ?><a> <?= $title; ?></a>
    </div>
    <div id="Contet">
		  <div class="jjleft floatLeft">
                    <div class="clearFloat">
                        <h3 class="jjtitle"> <?php if(isset($parentinfo)){ ?> <?php echo $parenttitle; ?> <?php }else{ ?><?= $title; ?><?php } ?> </h3>
                        
                        <ul class="jjul">
                            <?php foreach($childcat as $t){ ?>
                            <li<?php if($id == $t['id']){echo ' class="jjactive"';} ?>>
                                <a href="<?= yii\helpers\Url::to([$t['type'], 'id' => $t['id']]); ?>">
                                    <?php echo $t['name']; ?>
                                </a>
                            </li>
                            <?php } ?>
                       </ul>

                    </div>
                </div>
         
         <div id="Zhong">
              <div id="Tile">
                   <h3><?= $title; ?></h3>
                   <div>
					   <span style="display: inline-flex;">分享到 : <div style="margin-left: 10px;" class="bdsharebuttonbox">
					   <a href="#" class="bds_more" data-cmd="more"></a>
					   <a href="#" class="bds_qzone" data-cmd="qzone" title="分享到QQ空间"></a>
					   <a href="#" class="bds_tsina" data-cmd="tsina" title="分享到新浪微博"></a>
					   <a href="#" class="bds_tqq" data-cmd="tqq" title="分享到腾讯微博"></a>
					   <a href="#" class="bds_renren" data-cmd="renren" title="分享到人人网"></a>
					   <a href="#" class="bds_weixin" data-cmd="weixin" title="分享到微信"></a>
				    </div>
                       <script>window._bd_share_config={"common":{"bdSnsKey":{},"bdText":"","bdMini":"2","bdMiniList":false,"bdPic":"","bdStyle":"1","bdSize":"16"},"share":{},"image":{"viewList":["qzone","tsina","tqq","renren","weixin"],"viewText":"分享到：","viewSize":"16"},"selectShare":{"bdContainerClass":null,"bdSelectMiniList":["qzone","tsina","tqq","renren","weixin"]}};with(document)0[(getElementsByTagName('head')[0]||body).appendChild(createElement('script')).src='http://bdimg.share.baidu.com/static/api/js/share.js?v=89860593.js?cdnversion='+~(-new Date()/36e5)];</script></script></span></div>
              </div>
			  
			  <div class="Box">
				   <p><?php  echo $articles['content']; ?></p>
				
              </div>
         </div>



         <?php if($parentid == 1) { ?>
         <div id="Rt">
              <h3 class="h3_li">协会机构</h3>
              <ul class="yuan">
                <?php foreach($fenhui as $t){ ?>
                  <li style="margin-bottom:30px;"><a href="<?= yii\helpers\Url::to(['content/fenhui', 'id'=>$t['id']])?>"><span><img src="<?= yii::getAlias('@web');?>/upload/<?= json_decode($t['label_img'], true)['newname'];?>" /></span><p><?= $t['name'];?></p></a></li>
                  <?php } ?>
                  <li class="Fix"></li>
                  <li class="Fix"></li>
                  <li class="Fix"></li>
                  
              </ul>
              
              <h3 class="h3_li">会员天地</h3>
              <ul class="yuan">
                  <li><a href="<?= yii\helpers\Url::to(['list/memberstyle','id' => 20]); ?>"><span style="border:1px solid #d3d3d3"><img src="<?= yii::getAlias('@web');?>/images/fengcai.png" /></span><p style="color:#ebebeb">会员风采</p></a></li>
                  <li><a href="<?= yii\helpers\Url::to(['content/index','id' => 21]); ?>"><span style="border:1px solid #d3d3d3"><img src="<?= yii::getAlias('@web');?>/images/quanyi.png" /></span><p style="color:#ebebeb">会员权益</p></a></li>
                  <li><a href="<?= yii\helpers\Url::to(['member/apply']); ?>"><span style="border:1px solid #d3d3d3"><img src="<?= yii::getAlias('@web');?>/images/ruhui.png" /></span><p style="color:#ebebeb">申请入会</p></a></li>
                  <li class="Fix"></li>
                  <li class="Fix"></li>
                  <li class="Fix"></li>
                  
              </ul>
              
              <h3 class="h3_li">会员风采</h3>
              <ul class="yuan">
                  <?php foreach($memberstyle as $t) { ?>
                  <li style="margin-bottom:30px;border:1px solid #d3d3d3; height:75px;"><a href="<?= yii\helpers\Url::to([$membersytletype, 'id'=>$t['id']])?>"><span><img src="/upload/<?= json_decode($t['faceimg'], true)['newname'];?>" alt=""></span></a></li>
                  <?php } ?>
                  <li class="Fix"></li>
                  <li class="Fix"></li>
                  <li class="Fix"></li>
              </ul>
         </div>
         <?php } else { ?>
          <div id="Rt">
              <h3 class="h3_li">会员风采</h3>
              <ul class="yuan">
                  <?php foreach($memberstyle as $t) { ?>
                  <li style="margin-bottom:30px;border:1px solid #d3d3d3; height:75px;"><a href="<?= yii\helpers\Url::to([$membersytletype, 'id'=>$t['id']])?>"><span><img src="/upload/<?= json_decode($t['faceimg'], true)['newname'];?>" alt=""></span></a></li>
                  <?php } ?>
                  <li class="Fix"></li>
                  <li class="Fix"></li>
                  <li class="Fix"></li>
              </ul>
              <div class="clearFloat mt35">
                        <h3 class="indexh3"><span>分支机构</span></h3>
                        <ul class="fzdiv mt35">
                        <?php foreach($weiyuan as $t) { ?>
                          <li>
                              <a href="<?= yii\helpers\Url::to([$weiyuantype,'id' => $t['id']]); ?>">
                                  <?php echo(mb_substr(strip_tags($t['title']),0,10,'utf-8')); ?>
                              </a>
                          </li>
                        <?php } ?>
                        </ul>
                    </div>
                    <div class="clearFloat mt35">
                        <h3 class="indexh3"><span>品牌建设</span></h3>
                        <ul class="divtoneul">
                          <?php foreach($pinpai as $vo){ ?>
                            <li>
                                <a href="<?= yii\helpers\Url::to(['list/newscontent','id' => $vo['id']]); ?>"><?= $vo['title']; ?>...</a>
                            </li>
                          <?php } ?>
                        </ul>
                    </div>
         </div>
         <?php } ?>
         <div style="clear:both"></div>
    </div>